package com.ihisun.tmhcms.core.service.ossservice.impl;


import com.ihisun.tmhcms.core.service.ossservice.BaseService;
import com.ihisun.tmhcms.core.service.ossservice.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @author wanglai
 * @version v1.0.0
 * @description: 图片流处理机制
 * @date 2018/8/15 13:37
 */
@SuppressWarnings("ALL")
@Service
public class ImageServiceImpl implements ImageService {

    private final static String ALLOW_IMAGE_TYPE = "gif,png,jpg,jpeg,mp4";

    @Autowired
    private BaseService baseService;

    @Override
    public void getRealImageUrl(HttpServletResponse response, String actionUrl) {
        // 转发请求
        baseService.getOssRealUrl(response, actionUrl);
    }

    @Override
    public Map<String,String> getOssSignForWeb(String businessCode) throws Exception {
            Map<String, String> resultMap = baseService.getOssSignForWeb(businessCode, "SYS100001");
            return resultMap;

    }

}
